package com.ny.mapper;

import com.ny.entity.Reservations;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ReservationMapper {
    void addReservation(Reservations reservations);
    List<Reservations> findAllReservations();

    @Update("UPDATE reservations\n" +
            "    SET status = #{status}, reject_reason = #{rejectReason}\n" +
            "    WHERE reservation_id = #{reservationId}")
    void updateReservationStatus(@Param("reservationId") int reservationId, @Param("status") String status, @Param("rejectReason") String rejectReason);
}
